//
//  AFAppDotNetAPIClient.m
//  公考神器
//
//  Created by 毕武侠 on 16/8/5.
//  Copyright © 2016年 毕武侠. All rights reserved.
//

#import "AFAppDotNetAPIClient.h"

@implementation AFAppDotNetAPIClient

+ (instancetype)sharedClient {
    static AFAppDotNetAPIClient *_sharedClient = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _sharedClient = [[AFAppDotNetAPIClient alloc] initWithBaseURL:[NSURL URLWithString:[OtherNetworking sharedManager].STRURL]];
        _sharedClient.requestSerializer.timeoutInterval = 30;
        _sharedClient.operationQueue.maxConcurrentOperationCount = 5;
        _sharedClient.responseSerializer = [AFJSONResponseSerializer serializer];
        [_sharedClient.responseSerializer setAcceptableContentTypes:[NSSet setWithObjects:@"text/json",@"text/javascript",@"application/json",@"text/html",@"application/xhtml+xml",@"*/*",@"application/xhtml+xml",@"image/webp",@"image/jpg", nil]];
    });
    
    return _sharedClient;
}

@end
